﻿using FluentMigrator;

namespace Budget.DataBase.Migrations
{
    [Migration(9)]
    public class M009_CreateBalanceTable : Migration
    {
        private const string TABLE_NAME = "Balances";

        public override void Up()
        {
            Create.Table(TABLE_NAME)
                .WithKeyColumn()
                .WithTimeStamps()
                .WithColumn("Amount").AsDecimal(19, 5).NotNullable()
                .WithColumn("LostMoney").AsDecimal(19, 5).NotNullable().WithDefaultValue(0);
        }

        public override void Down()
        {
            Delete.Table(TABLE_NAME);
        }
    }
}